package com.seednia.module.core.comment.dto;

import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.apache.commons.lang.StringUtils;

import com.seednia.foundation.framework.dto.AbstractRecord;
import com.seednia.foundation.framework.dto.ICriteria;
import com.seednia.foundation.framework.util.RecordUtils;

@XmlRootElement(name = "CommentCriteria", 
namespace = "http://seednia.com/core/1.0")
@XmlType(name = "CommentCriteria")
@XmlAccessorType(XmlAccessType.FIELD)
public class CommentCriteria extends CommentDto implements ICriteria {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2550123810795133156L;
	
	public CommentCriteria()
	{
		RecordUtils.initCriteria(this);
	}

	@Override
	public Date getCreatedBefore() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Date getCreatedAfter() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setSearchText(String value)
	{
		super.setBody(value);
	}
	
	/**
	 * To create object from JSONP string
	 * Used by the REST framework when sending this object as parameter
	 * @param jsonStr
	 * @return
	 */
	public static CommentCriteria fromString(String jsonStr) {
		CommentCriteria retval = (CommentCriteria) AbstractRecord.fromString(CommentCriteria.class, jsonStr);
		return retval;
	}
}
